home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / oop_tp55.zip / LIST1_4.PAS < prev    next >
Pascal/Delphi Source File  |  1989-12-10  |  1KB  |  65 lines

  1.             type
  2.  
  3.             string32 = string[32];
  4.  
  5.             Proc = procedure( aa: integer; bb: real; cc : string;
  6.                var a : integer; var b : real; var c : string32 );
  7.  
  8.  
  9.             XYZ = object
  10.                   a : integer;
  11.                   b : real;
  12.                   c : string32;
  13.                   init : Proc;
  14.                   end;
  15.           {$F+}
  16.             procedure Init( aa : integer; bb : real; cc : string;
  17.                             var a : integer; var b : real;
  18.                             var c : string32 );
  19.             begin
  20.                  a := aa;
  21.                  b := bb;
  22.                  c := cc;
  23.             end;
  24.           {$F-}
  25.  
  26.             var
  27.             R    :    XYZ;
  28.  
  29.             begin
  30.  
  31.             R.Init := Init;
  32.             R.Init( 1234, 2.71, 'This is a test', R.a, R.b, R.c);
  33.             writeln( 'The integer value is ', R.a );
  34.             writeln( 'The string value is "', R.c, '"' );
  35.             writeln( 'The real value is ', R.b );
  36.  
  37.             end.
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.